package com.InvoicingSystem.service.impl;

import org.apache.ibatis.session.SqlSession;
import org.springframework.stereotype.Service;

import com.InvoicingSystem.dao.UserInfoMapper;
import com.InvoicingSystem.pojo.UserInfo;
import com.InvoicingSystem.service.UserInfoService;
import com.InvoicingSystem.util.MyBatisUtil;
@Service
public class UserInfoServiceImpl implements UserInfoService {

	@Override
	public UserInfo findUserLogin(String username, String password) {
		// 调用DAO			
		/*
		 * MyBatis
		 */

		SqlSession session = MyBatisUtil.getSession();
		UserInfoMapper userInfoMapper = session.getMapper(UserInfoMapper.class);

		UserInfo userInfo = userInfoMapper.findUserLogin(username, password);

		

		return userInfo;
	}

}
